/**
 * 
 */
package de.cbf.cam.dsa.facet.weapon_ranged.persister.mock.service;

import org.osgi.framework.Bundle;
import org.osgi.framework.ServiceFactory;
import org.osgi.framework.ServiceRegistration;

import de.cbf.cam.dsa.facet.weapon_ranged.persister.mock.ServicePersister_FacetWeaponRanged_Mock;
import de.cbf.cam.dsa.facet.weapon_ranged.service.persister_interface.IServicePersister_FacetWeaponRanged;

/**
 * @author Nebelritter
 *
 */
public class ServiceFactoryPersister_FacetWeaponRanged_Mock implements ServiceFactory<IServicePersister_FacetWeaponRanged> {

	protected ServicePersister_FacetWeaponRanged_Mock service;

	@Override
	public IServicePersister_FacetWeaponRanged getService(Bundle bundle,
			ServiceRegistration<IServicePersister_FacetWeaponRanged> registration) {
		if(service == null){
			service = new ServicePersister_FacetWeaponRanged_Mock();			
		}
		return service;	
	}

	@Override
	public void ungetService(
			Bundle bundle,
			ServiceRegistration<IServicePersister_FacetWeaponRanged> registration,
			IServicePersister_FacetWeaponRanged service) {
		this.service = null;		
	}	
}
